<template>
	<view class="i_frame">
		<view class="input">
			<text>输入:</text><input type="text" v-model="title" style="color: purple;" />
		</view>
		<view class="output">
			<text>回传得到:</text>
			<input type="text" v-model="callBack" style="color: mediumpurple;" />
		</view>
		<view class="zujian">
			<SonA :intent="title" />
			<SonB @cb="back" />
		</view>
	</view>
</template>

<script>
	import SonA from '../../components/SonA.vue';
	import SonB from '../../components/SonB.vue';
	export default {
		components: {
			SonA,
			SonB
		},
		data() {
			return {
				title: '',
				callBack: ''
			}
		},
		methods: {
			back(msg) {
				console.warn("--index--" + msg);
				this.callBack = msg;
			}
		}
	}
</script>

<style>
	.i_frame {
		padding: 40rpx;

	}

	.input {
		display: flex;
		background-color: paleturquoise;
		margin: 10rpx;
		height: 60rpx;
	}

	.output {
		display: flex;
		background-color: aqua;
		margin: 10rpx;
		height: 60rpx;
	}
	.zujian{
		padding: 20rpx;
	}
</style>